﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace portfolio.DataAccess.AboutScreen
{
    public class AboutScreenDAO
    {
        public string GetAboutScreenDataForValue(string aboutValue)
        {
            string aboutControl = "";
            using(var db = new AboutScreenContext())
            {
                db.Database.Connection.Open();
                aboutControl = (from screen in db.AboutScreens
                                where screen.AboutValue == aboutValue
                                select screen.AboutControl).Single().ToString();

                db.Database.Connection.Close();
            }

            return aboutControl;
        }
    }
}
